package com.zsyg.sys.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import com.zsyg.sys.entity.SysUser;
import com.zsyg.sys.mapper.SysUserMapper;
import com.zsyg.sys.service.SysUserService;
import com.zsyg.common.base.BaseServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author YangWanLi
 * @since 2018-08-16
 */
@Service
public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, SysUser> implements SysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    /**
     * 分页
     * @param page
     * @param sysUser
     * @return
     */
    @Override
    public PageInfo<SysUser> findPage (Page<SysUser> page, SysUser sysUser){
        page = PageHelper.startPage(page.getPageNum(),page.getPageSize());
        sysUserMapper.findAll(sysUser);
        return page.toPageInfo();
    }

}
